﻿<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>PinPad</title>
		<link  rel="stylesheet" type="text/css" href="../Resource/API.css"/>
	</head>
	<body>
		<div id="Main">
			<div id="PinPad-box" class="box">
				<p class="p1">密码键盘(PinPad)</p>
				<input id="PinPad_GetPinPadStatusAsync" class="button01" type="button" value="GetPinPadStatusAsync" />
				<table class="funInfo">
					<tr>
						<th>JS API：</th>
						<td class="js">PinPad.GetPinPadStatusAsync()</td>
					</tr>
					<tr>
						<th>C#原型：</th>
						<td class="cSharp">GetPinPadStatusAsync(string eventArgsExStr = "",uint nTimeout= ConstHelper.TIME_OUT)</td>
					</tr>
					<tr>
                       <th><span class="param">eventArgsExStr</span></th>
					   <td>扩展参数，可选</td>
					</tr>
					<tr>
                       <th><span class="param">nTimeout</span></th>
					   <td>超时时间，可选，默认30S</td>
					</tr>
					<tr>
						<th>返回值：</th>
						<td class="json">
                        {
                            "code":1,
                            "cmd":"CMD"
                        }
                        </td>
					</tr>
					<tr>
                      <th>JS回调：</th>
					  <td class="js">GetPinPadStatusAsyncCallBack(msg)</td>
					</tr>
					
				</table>
				<p class="p2">Result:</p>
				<p class="p3" id="PinPad_GetPinPadStatusAsync_Result"></p>
				<p class="p2">CallBack:</p>
				<p class="p3" id="PinPad_GetPinPadStatusAsync_CallBack"></p>
				<hr class="hr1" />
				
				<input id="PinPad_ResetPinpadStatusAsync" class="button01" type="button" value="ResetPinpadStatusAsync" />
                <table class="funInfo">
                    <tr>
                        <th>JS API：</th>
                        <td class="js">PinPad.ResetPinpadStatusAsync()</td>
                    </tr>
                    <tr>
                        <th>C#原型：</th>
                        <td class="cSharp">ResetPinpadStatusAsync(string eventArgsExStr = "", uint nTimeout = ConstHelper.TIME_OUT)</td>
                    </tr>
                    <tr>
                        <th><span class="param">eventArgsExStr</span></th>
                        <td>扩展参数，可选</td>
                    </tr>
                    <tr>
                        <th><span class="param">nTimeout</span></th>
                        <td>超时时间，可选，默认30S</td>
                    </tr>
                    <tr>
                        <th>返回值：</th>
                        <td class="json">
                            {
                                "code":1,
                                "cmd":"CMD"
                            }
                        </td>
                    </tr>
                    <tr>
                        <th>回调函数：</th>
                        <td class="js">ResetPinpadStatusAsyncCallBack(msg)</td>
                    </tr>

                </table>
				<p class="p2">Result:</p>
				<p class="p3" id="PinPad_ResetPinpadStatusAsync_Result"></p>
				<p class="p2">CallBack:</p>
				<p class="p3" id="PinPad_ResetPinpadStatusAsync_CallBack"></p>
				<hr class="hr1" />
				
				<input id="PinPad_GetPinpadDataAsync" class="button01" type="button" value="GetPinpadDataAsync" />
                <table class="funInfo">
                    <tr>
                        <th>JS API：</th>
                        <td class="js">PinPad.GetPinpadDataAsync(usMaxLen,bAutoEnd,strActiveKeys,strTerminateKeys)</td>
                    </tr>
                    <tr>
                        <th>C#原型：</th>
                        <td class="cSharp">GetPinpadDataAsync(ushort usMaxLen, int bAutoEnd, string strActiveKeys, string strTerminateKeys, uint nTimeout = ConstHelper.TIME_OUT)</td>
                    </tr>
                    <tr>
                        <th><span class="param">usMaxLen</span></th>
                        <td>最大数据长度</td>
                    </tr>
                    <tr>
                        <th><span class="param">bAutoEnd</span></th>
                        <td>是否自动结束,0,1</td>
                    </tr>
                    <tr>
                        <th><span class="param">strActiveKeys</span></th>
                        <td>激活需要使用的Key, 包括类型有number，dot， backspace，clear， enter，cancel，输入时以“|”分割</td>
                    </tr>
                    <tr>
                        <th><span class="param">strTerminateKeys</span></th>
                        <td>结束输入键, 包括类型有number，dot， backspace，clear， enter，cancel，输入时以“|”分割</td>
                    </tr>
                    <tr>
                        <th><span class="param">nTimeout</span></th>
                        <td>超时时间，可选，默认30S</td>
                    </tr>
                    <tr>
                        <th>返回值：</th>
                        <td class="json">
                            {
                            "code":1,
                            "cmd":"CMD"
                            }
                        </td>
                    </tr>
                    <tr>
                        <th>回调函数：</th>
                        <td class="js">GetPinpadDataAsyncCallBack(msg)</td>
                    </tr>

                </table>
				<p class="p2">usMaxLen:<input id="PinPad_GetPinpadDataAsync_usMaxLen" class="text01" type="text" value="6" /></p>
				<p class="p2">bAutoEnd:<input id="PinPad_GetPinpadDataAsync_bAutoEnd" class="text01" type="text" value="0" /></p>
				<p class="p2">strActiveKeys:<input id="PinPad_GetPinpadDataAsync_strActiveKeys" class="text01" type="text" value="number|dot|clear|enter|cancel" /></p>
				<p class="p2">strTerminateKeys:<input id="PinPad_GetPinpadDataAsync_strTerminateKeys" class="text01" type="text" value="enter|cancel|Clear" /></p>
				<p class="p2">Result:</p>
				<p class="p3" id="PinPad_GetPinpadDataAsync_Result"></p>
				<p class="p2">CallBack:</p>
				<p class="p3" id="PinPad_GetPinpadDataAsync_CallBack"></p>
				<hr class="hr1" />
				<input id='aaaaaa_Btn' class='button01' type='button' value='aaaaaa' /><table class='funInfo'><tr><th>函数说明：</th><td>aa</td></tr><tr><th>JS API：</th><td class='js'>a</td></tr><tr><th>C#原型：</th><td class='cSharp'>aaa</td></tr><tr><th>返回值：</th><td class='json'>aaaaaa</td></tr><tr><th>JS回调：</th><td class='js'>无</td></tr></table><p class='p2'>Result:</p><p class='p3' id='aaaaaa_Result'></p><p class='p2'>CallBack:</p><p class='p3' id='aaaaaa_CallBack'></p><hr class='hr1' />
<input id='bbbbbb_Btn' class='button01' type='button' value='bbbbbb' /><table class='funInfo'><tr><th>函数说明：</th><td>aa</td></tr><tr><th>JS API：</th><td class='js'>a</td></tr><tr><th>C#原型：</th><td class='cSharp'>aaa</td></tr><tr><th>返回值：</th><td class='json'>aaaaaa</td></tr><tr><th>JS回调：</th><td class='js'>b</td></tr></table><p class='p2'>Result:</p><p class='p3' id='bbbbbb_Result'></p><p class='p2'>CallBack:</p><p class='p3' id='bbbbbb_CallBack'></p><hr class='hr1' />
<!--HTMLHolder-->
			</div>
		</div>
		<script type="text/javascript" src="../Resource/jquery.js"></script>
        <script src="../Resource/API.js"></script>
		<script type="text/javascript">
          
		  (function(){

            $("#PinPad_GetPinPadStatusAsync").click(function(){
				var result=window.external.PinPad.GetPinPadStatusAsync();
				$("#PinPad_GetPinPadStatusAsync_Result").text(result);
			});

			$("#PinPad_ResetPinpadStatusAsync").click(function(){
                var result=window.external.PinPad.ResetPinpadStatusAsync();
				$("#PinPad_ResetPinpadStatusAsync_Result").text(result);

			});
         
		   $("#PinPad_GetPinpadDataAsync").click(function(){
                var usMaxLen=$("#PinPad_GetPinpadDataAsync_usMaxLen").val();
				var bAutoEnd=$("#PinPad_GetPinpadDataAsync_bAutoEnd").val();
				var strActiveKeys=$("#PinPad_GetPinpadDataAsync_strActiveKeys").val();
				var strTerminateKeys=$("#PinPad_GetPinpadDataAsync_strTerminateKeys").val();
				var result=window.external.PinPad.GetPinpadDataAsync(usMaxLen,bAutoEnd,strActiveKeys,strTerminateKeys);
				$("#PinPad_GetPinpadDataAsync_Result").text(result);
		   });

		   function GetPinPadStatusAsyncCallBack(msg) {
				$("#PinPad_GetPinPadStatusAsync_CallBack").text(msg);
			}
		   function ResetPinpadStatusAsyncCallBack(msg) {
				$("#PinPad_ResetPinpadStatusAsync_CallBack").text(msg);
			}

		   function GetPinpadDataAsyncCallBack(msg) {
				$("#PinPad_GetPinpadDataAsync_CallBack").text(msg);
			}

			
			<!--JSHolder-->
			
		  })();
			
		
			
		</script>
	</body>
</html>
